home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GEMFBIND / AESFSEL4.S < prev    next >
Text File  |  1993-03-26  |  2KB  |  66 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* AESFAST Public Domain GEM bindings.
  5. ;*    Maintenance:
  6. ;*     12/17/89 v1.4: This source file is new with this version.
  7. ;*                    Yet another variation on the fsel_exinput function.
  8. ;*                    This version, fsel_14input is the most vanilla access
  9. ;*                    to fsel_exinput.  We check the AES version, and call
  10. ;*                    either fsel_input or fsel_exinput; no emulation modes
  11. ;*                    are available.
  12. ;*========================================================================
  13.  
  14. ;*************************************************************************
  15. ;*
  16. ;* Extended fsel manager routine.
  17. ;*
  18. ;*************************************************************************
  19.  
  20. ;-------------------------------------------------------------------------
  21. ; fsel_14input
  22. ;  This function is new with TOS 1.4, but this binding supports it in all
  23. ;  TOS/AES versions by calling the old fsel_input routine if running on
  24. ;  a pre-1.4 system.
  25. ;-------------------------------------------------------------------------
  26.  
  27.           globl     _fsel_14input
  28. _fsel_14input:
  29.  
  30. ;          .cargs    #8,pinpath.l,pinsel.l,pbutton.l,plabel.l
  31.  
  32. pinpath         =    8
  33. pinsel            =    12
  34. pbutton         =    16
  35. plabel            =    20
  36.  
  37.           link        a6,#-4
  38.  
  39.           move.l    plabel(a6),d0            ; Swap the button and prompt
  40.           move.l    pbutton(a6),plabel(a6) ; string pointers to make the
  41.           move.l    d0,pbutton(a6)            ; addrin stuff contiguous.
  42.  
  43.           move.l    #$5A000202,d0       ; AControl  90,0,2,2                 ; Assume we'll call fsel_input.
  44.           move.w    _gl_apversion,d1         ; Check the AES version.  If
  45.           cmp.w     #$0104,d1                 ; it's $0104, we're running
  46.           beq.b     newaes                    ; on the RAM-based TOS 1.4
  47.           cmp.w     #$0130,d1                 ; Else, if it's less than $0130
  48.           blt        doit                    ; we have to use fsel_input.
  49. newaes:
  50.           move.l    #$5B000203,d0       ; AControl  91,0,2,3                 ; AES v1.3 & up: fsel_exinput
  51. doit:
  52.           moveq.l    #-4,d1                     ; is a legal function, do it.
  53.           lea        pinpath(a6),a0            ; a0 -> addrin
  54.           jsr        aes_call                 ; Call AES.
  55.  
  56.           move.l    plabel(a6),d0            ; Swap the prompt string and
  57.           move.l    pbutton(a6),plabel(a6) ; button pointers back to how
  58.           move.l    d0,pbutton(a6)            ; they were on entry.
  59.  
  60.           moveq.l    #-4,d1                     ; Return values from
  61.           lea        pbutton(a6),a1            ; intout[] array to caller
  62.           jmp        (a0)                     ; via aes_return routine.
  63.  
  64. ;          end of code
  65.  
  66.